package org.liuyunfeng.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: TanJingyu
 * @create: 2023-02-17 21:46
 **/
@RestController
@RequestMapping("/sentinel")
public class SentinelController {
    @Autowired
    private RedisTemplate redisTemplate;

    @GetMapping("/getName")
    public Object getName() {
        return redisTemplate.opsForValue().get("name");
    }
}

    